<?php include _include(ADMIN_PATH.'view/htm/header.inc.htm');?>
<!--{hook admin_other_cache_start.htm}-->
<div class="container-fluid">
<div class="row">
	<div class="col-12">
		<div class="card">
			<div class="card-body">
				<form action="<?php echo url('other-cache', '', TRUE);?>" method="post" id="form">
					<?php echo $input['safe_token'];?>
					<div class="row">
                        <div class="col-6 col-md-3 mx-auto">
                            <div class="form-group d-flex justify-content-between">
                                <label class="form-control-label"><?php echo lang('admin_clear_tmp');?>：</label>
                                <div>
                                    <?php echo $input['clear_tmp'];?>
                                </div>
                            </div>
                            <div class="form-group d-flex d-flex justify-content-between">
                                <label class="form-control-label"><?php echo lang('admin_clear_cache');?>：</label>
                                <div>
                                    <?php echo $input['clear_cache'];?>
                                </div>
                            </div>
                        </div>
                    </div>
					<div class="form-group row">
						<div class="col-sm-12">
							<button type="submit" class="btn btn-danger btn-block col-md-3 mx-auto" id="submit" data-loading-text="<?php echo lang('submiting');?>..."><?php echo lang('confirm');?></button>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
</div>
</div>
<!--{hook admin_other_cache_end.htm}-->	
<?php include _include(ADMIN_PATH.'view/htm/footer.inc.htm');?>
<script>
var jform = $('#form');
jform.on('submit', function() {
	jform.reset();
    var jthis = $(this);
    var jsubmit = jthis.find('#submit');
	jsubmit.button('loading');
	var postdata = jform.serialize();
	$.xpost(jform.attr('action'), postdata, function(code, message) {
		if(code == 0) {
			$.alert(message);
			jsubmit.text(message).delay(1000).location();
		} else if(xn.is_number(code)) {
			alert(message);
			jsubmit.button('reset');
		} else {
			jform.find('[name="'+code+'"]').alert(message).focus();
			jsubmit.button('reset');
		}
	});
	return false;
});

$('#other').addClass('show');
$('li.other, .menu-cache').addClass('active').find('a').removeClass('collapsed');
</script>

<!--{hook admin_other_cache_js.htm}-->